package org.springmvc.web.context;

import jakarta.servlet.ServletContext;
import org.springmvc.context.ApplicationContext;

/**
 * @author marin
 * @version 1.0
 * @date 2025/9/2 20:55
 * @desc web项目的上下问对象
 */
@SuppressWarnings("all")
public class WebApplicationContext extends ApplicationContext {

    //上下文对象(web上下文才有这个属性)
    private ServletContext servletContext;

    //springmvc配置文件的路径
    private String springMVCConfigLocation;

    public WebApplicationContext(ServletContext servletContext, String springMVCConfigLocation) {
        super(springMVCConfigLocation);
        this.servletContext = servletContext;
    }

    public ServletContext getServletContext() {
        return servletContext;
    }

    public void setServletContext(ServletContext servletContext) {
        this.servletContext = servletContext;
    }

    public String getSpringMVCConfigLocation() {
        return springMVCConfigLocation;
    }

    public void setSpringMVCConfigLocation(String springMVCConfigLocation) {
        this.springMVCConfigLocation = springMVCConfigLocation;
    }
}
